import instance from "../../request";

export async function simpleChat(userMessage){
    try {
        const res = await instance({
            url: '/Gpt/simple-chat',
            method: 'post',
            data: userMessage
        });
        return res;
    } catch (err) {
        console.log(err);
    }
}

export async function travelRecommendByGpt(travelRecommend){
    try {
        const res = await instance({
            url: '/Gpt/travel-recommend',
            method: 'post',
            data: travelRecommend
        });
        return res;
    } catch (err) {
        console.log(err);
    }
}

export async function spotAnalysis(analysis){
    try {
        const res = await instance({
            url: '/Gpt/spot-analysis',
            method: 'post',
            data: analysis
        });
        return res;
    } catch (err) {
        console.log(err);
    }
}

export async function continuousChat(content){
    try {
        const res = await instance({
            url: '/Gpt/continuous-chat',
            method: 'post',
            data: content
        });
        return res;
    } catch (err) {
        console.log(err);
    }
}